Optimal. Leaf size=58 \[ \frac{a \cos ^3(c+d x)}{3 d}+\frac{a \cos ^2(c+d x)}{2 d}-\frac{a \cos (c+d x)}{d}-\frac{a \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0773241, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {3872, 2836, 12, 75} \[ \frac{a \cos ^3(c+d x)}{3 d}+\frac{a \cos ^2(c+d x)}{2 d}-\frac{a \cos (c+d x)}{d}-\frac{a \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2836
Rule 12
Rule 75
Rubi steps
\begin{align*} \int (a+a \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-a-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{a (-a-x) (-a+x)^2}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-a-x) (-a+x)^2}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-\frac{a^3}{x}+a x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac{a \cos (c+d x)}{d}+\frac{a \cos ^2(c+d x)}{2 d}+\frac{a \cos ^3(c+d x)}{3 d}-\frac{a \log (\cos (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0462975, size = 57, normalized size = 0.98 \[ -\frac{3 a \cos (c+d x)}{4 d}+\frac{a \cos (3 (c+d x))}{12 d}-\frac{a \left (\log (\cos (c+d x))-\frac{1}{2} \cos ^2(c+d x)\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.084, size = 61, normalized size = 1.1 \begin{align*} -{\frac{a\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3\,d}}-{\frac{2\,a\cos \left ( dx+c \right ) }{3\,d}}-{\frac{a \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{a\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12464, size = 63, normalized size = 1.09 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, a \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.82297, size = 126, normalized size = 2.17 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, a \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \sin ^{3}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.42774, size = 89, normalized size = 1.53 \begin{align*} -\frac{a \log \left (\frac{{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac{2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, a d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]